Skip to main content

jobs

Table: jobs

The jobs table stores ZD file upload tasks within the system.
It tracks the status, execution times, and results of jobs assigned to users.


Columns

Column NameData TypeConstraintsDescription
idint(11)NOT NULL, AUTO_INCREMENT, PRIMARY KEY, UNIQUEUnique identifier for each job
typevarchar(50)NULLType or category of the job
statusenum('PENDING','DISPATCHED','DISPATCH_FAILED','STARTED','IN_PROGRESS','COMPLETED','FAILED')NOT NULLCurrent status of the job
mappedIdint(11)NOT NULLID of the user assigned to the job (references user.mappedId)
datatextNULLJob-specific data or payload
created_atdatetimeDEFAULT CURRENT_TIMESTAMPTimestamp when the job was created
modified_atdatetimeDEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMPTimestamp when the job was last updated
started_atdatetimeNULLTimestamp when the job execution started
completed_atdatetimeNULLTimestamp when the job execution completed
resulttextNULLResult or output produced by the job
commentstextNULLAdditional comments or notes about the job

Indexes

  1. PRIMARY - Primary key on id
  2. UNIQUE - Unique constraint on id (job_id_UNIQUE)
  3. fk_jobs_mappedId_idx - Index on mappedId

Foreign Key Relations

  1. fk_jobs_mappedIduser.mappedId
    • Links each job to the user responsible or assigned for execution

Usage Notes

  • Tracks scheduled or on-demand tasks, their execution status, and outcomes.
  • status enum allows monitoring job lifecycle from pending to completion or failure.
  • data and result fields store job-specific information for processing or auditing.
  • Indexed by mappedId to quickly find all jobs assigned to a specific user.